1. Field
One or more embodiments relate to an electronic apparatus, e.g., a photographing apparatus, and a method.
2. Description of the Related Art
In electronic photographing apparatuses such as digital still cameras, white balance correction, whereby white balance is corrected, is widely known. In white balance correction according to the related art, the same white balance gain is applied to all pixels.
For example, in a scene in which normal light is dark, photographing is performed by emitting flash light so as to solve a problem of a lack of exposure. In this case, a white balance gain is calculated in a scene in which normal light and flash light are mixed according to the amount of emitted flash light. Since a subject at a short distance from a digital still camera has a high dependency on flash light, an appropriate white balance may be obtained. However, a subject that is distant from the digital still camera has an increasing dependency on normal light. In this case, when normal light is light emitted from a fluorescent lamp, a color temperature difference between normal light and flash light increases. Thus, an inappropriate white balance occurs, and accordingly, an image of a white subject looks yellow.
In order to solve these problems, there are the following related art. A technique whereby a flash turned-on image and a flash turned-off image are compared with each other so as to calculate a flash mixture ratio, to calculate an optimal white balance gain in a unit of a pixel from the flash mixture ratio, and to apply the white balance gain, is known. In the technique, a light source color of flash light and a light source color of normal light are linearly interpolated at the flash mixture ratio so as to calculate the white balance gain. The light source color of flash light uses a value obtained when all of the previously-measured flash light is irradiated on a subject so that the white balance gain may be calculated based on the flash mixture ratio.
Also, there are other techniques. A flash turned-on image and a flash turned-off image are synthesized according to a threshold value and a synthesis ratio based on a brightness value in each pixel so as to generate an image. The brightness of the flash turned-on image and the brightness of the flash turned-off image are compared with each other so as to calculate a white balance gain on a subject based on image data regarding an area of the flash turned-on image. A brightness difference that exceeds the threshold value or a white balance gain is accurately calculated even from a subject in which a white balance gain varies smoothly or a brightness value varies rapidly.